<script setup lang="ts">
import { RouterView } from 'vue-router'

const envMode = import.meta.env.MODE
const keepAliveName = ['receipt', 'select', 'add']
</script>

<template>
  <router-view class="app-container" v-slot="{ Component }">
    <keep-alive :include="keepAliveName">
      <Component :is="Component"></Component>
    </keep-alive>
  </router-view>
  
  
  <p class="env-wraper" v-if="envMode != 'production'">当前环境：{{envMode}}</p>
</template>

<style scoped lang="scss">
.app-container {
  width: 100%;
  height: 100%;
  overflow: auto;
  position: relative;
}
.env-wraper {
  position: fixed;
  right: 20px;
  bottom: 20px;
  font-size: 40px;
  color: lightgray;
} 
/* .logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
} */
</style>
